package org.novelhibernate.support.logging;

/**
 * This is the value object that contains the resource needs to be released after
 * an operation terminates  
 * 
 * Note that this approach only aims to release resource when exception or operation complete (normally for
 * those method with out parameters), other complex usage please consider using a custom handling method 
 * and then sign them up within the ExceptionRegistry
 * 
 * 
 * @author Tao Chen
 *
 */
public class FinallizedObject {

	private Object[] exceptionObjects;
	private String[][] exceptionMethods;
	
	private Object[] finalObjects;
	private String[][] finalMethods;
	
	public FinallizedObject() {
	
	}
	
	

	public void setFinalHandler(Object[] finalObjects, String[][] finalMethods) {
		
		this.finalObjects = finalObjects;
		this.finalMethods = finalMethods;
	}



	public void setExceptionHandler(Object[] exceptionObjects,
			String[][] exceptionMethods) {
		
		this.exceptionObjects = exceptionObjects;
		this.exceptionMethods = exceptionMethods;
	}



	public void setFullHandler(Object[] exceptionObjects,
			String[][] exceptionMethods, Object[] finalObjects,
			String[][] finalMethods) {
	
		this.exceptionObjects = exceptionObjects;
		this.exceptionMethods = exceptionMethods;
		this.finalObjects = finalObjects;
		this.finalMethods = finalMethods;
	}



	public Object[] getExceptionObjects() {
		return exceptionObjects;
	}

	public void setExceptionObjects(Object[] exceptionObjects) {
		this.exceptionObjects = exceptionObjects;
	}

	public String[][] getExceptionMethods() {
		return exceptionMethods;
	}

	public void setExceptionMethods(String[][] exceptionMethods) {
		this.exceptionMethods = exceptionMethods;
	}

	public Object[] getFinalObjects() {
		return finalObjects;
	}

	public void setFinalObjects(Object[] finalObjects) {
		this.finalObjects = finalObjects;
	}

	public String[][] getFinalMethods() {
		return finalMethods;
	}

	public void setFinalMethods(String[][] finalMethods) {
		this.finalMethods = finalMethods;
	}



}
